<template>
  <div class="home-left-bottom-wrapper">
    <comp-title v-if="dataSet.rightBottom" :text="dataSet.rightBottom.title" ref="compTitle"></comp-title>
    <tableItem
      ref="rbTable"
      :data="dataSet.rightBottom ? dataSet.rightBottom.data : []"
      :tbTitle="tbTitle"
      :tbStyle="tbStyle"
    ></tableItem>
    <img
      src="../../../assets/imgs/left/bottomBg.png"
      class="bt-bg"
      ref="btBg"
    />
  </div>
</template>

<script>
import { mapState } from 'vuex'
import CompTitle from '@/components/common/compTitle.vue'
import tableNumber from './tableNumber'
import tableItem from './tableItem'
export default {
  components: {
    CompTitle,
    tableNumber,
    tableItem
  },
  data() {
    return {
      tbTitle: ['风险类型', '风险总量', '已处理', '未处理', '总量环比'],
      tbStyle: {
        title1Width: '36%',
        title2Width: '15%'
      }
    }
  },
  created() {
  },
  mounted() {},
  computed: {
    ...mapState(['dataSet'])
  },
  watch: {},
  methods: {
   
    init() {
      let tl = new TimelineMax({})
      tl.add(this.$refs.compTitle.init(), 'start+=0')
      let btBg = TweenMax.from(this.$refs.btBg, 0.3, { opacity: 0 })
      tl.add(this.$refs.rbTable.init(), 'start+=0.2')
        .add(btBg, 'start+=1.1')
      return tl
    }
  }
}
</script>
<style lang="scss" scoped>
.home-left-bottom-wrapper {
  .bt-bg {
    margin-top: -35px;
  }
}
</style>
